package com.weixin.service;

import java.sql.SQLException;
import java.util.List;

import com.weixin.entity.HouseGoods;

public interface IHouseGoodsService {
	/**
	 * 查询所有库存商品信息
	 * @return
	 * @throws SQLException
	 */
	public List<HouseGoods> selectAll() throws SQLException;
	
	/**
	 * 根据商品编号查找库存商品信息
	 * @param h_goods_id
	 * @return
	 * @throws SQLException
	 */
	public HouseGoods selectById(int h_goods_id)throws SQLException;
	
	/**
	 * 插入商品信息
	 * @param houseGoods
	 * @return
	 * @throws SQLException
	 */
	public boolean insertHGoods(HouseGoods houseGoods)throws SQLException;
	
	/**
	 * 更新商品信息
	 * @param houseGoods
	 * @return
	 * @throws SQLException
	 */
	public boolean updateHGoods(HouseGoods houseGoods)throws SQLException;
	
	/**
	 * 根据编号删除库存商品信息
	 * @param h_goods_id
	 * @return
	 * @throws SQLException
	 */
	public boolean deleteById(int h_goods_id)throws SQLException;
	/**
	 * 得到所有库存商品相关的信息
	 * @param pageNum 
	 * @param pageSize 
	 * @return
	 * @throws SQLException
	 */
	public List<HouseGoods> getAllAbout(int pageSize, int pageNum) throws SQLException;
	
	/**
	 * 根据商品编号查找该商品  
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public HouseGoods selectByGoodsId(int goods_id)throws SQLException;
	
	/**
	 * 得到库存商品信息的总条数
	 * @return
	 * @throws SQLException
	 */
	public int getAllAboutTotal()throws SQLException;
	/**
	 * 模糊查询表中所有选项
	 * @param pageSize
	 * @param pageNum
	 * @return
	 * @throws SQLException
	 */
	public List<HouseGoods> getSearchAbout(int pageSize,int pageNum,String search) throws SQLException;
	/**
	 * 模糊查询数据的总条数
	 * @param search
	 * @return
	 * @throws SQLException
	 */
	public int getSearchAboutTotal(String search)throws SQLException;
	
	/**
	 * 根据库存商品编号查找商品相关信息
	 * @param h_goods_id
	 * @return
	 * @throws SQLException
	 */
	public HouseGoods getAllAboutById(int h_goods_id) throws SQLException;
	/**
	 * 根据编号为商品添加图片
	 * @param picturen_name
	 * @return
	 * @throws SQLException
	 */
	public boolean addPictureForGoos(String picture_name,int h_goods_id)throws SQLException;
	/**
	 * 得到库存商品信息为商品图片展示用
	 * @return
	 * @throws SQLException
	 */
	public List<HouseGoods> getAllForPicture()throws SQLException;
	/**
	 * 根据id为商品添加介绍
	 * @param introduce
	 * @param h_goods_id
	 * @return
	 * @throws SQLException
	 */
	public boolean addIntroduceForGoods(String introduce,int h_goods_id)throws SQLException;
	/**
	 * 得到所有库存商品相关的信息用来导出到Excel表格
	 * @param pageNum 
	 * @param pageSize 
	 * @return
	 * @throws SQLException
	 */
	public List<HouseGoods> getAllAboutForExcel() throws SQLException;
}
